package com.ltmonitor.jt808.protocol;

public class PostitionAdditional_Mileage implements IPositionAdditionalItem {

	public final int getAdditionalId() {
		return 0x01;
	}

	public final byte getAdditionalLength() {
		return 0x04;
	}

	/**
	 * 里程，DWORD，1/10km，对应车上里程表读数
	 */

	private int mileage;

	public final int getMileage() {
		return mileage;
	}

	public final void setMileage(int value) {
		mileage = value;
	}

	public final byte[] WriteToBytes() {
		return BitConverter.GetBytes(getMileage());
	}

	public final void ReadFromBytes(byte[] bytes) {
		this.mileage = BitConverter.ToUInt32(bytes, 0);
	}
}